package com.ehotting.edsta.mqbd.signal.netty.action;

import com.alibaba.fastjson.JSON;
import com.ehotting.eaf.netty.action.Action;
import com.ehotting.eaf.netty.action.ActionAble;
import com.ehotting.eaf.netty.domain.DataAble;
import com.ehotting.edsta.mqbd.signal.api.SignalActionConstants;
import com.ehotting.edsta.mqbd.signal.api.domain.netty.ProgressPushRequest;
import com.ehotting.edsta.mqbd.signal.api.domain.netty.StopSimulateRequest;
import com.ehotting.mqbd.core.manager.AgentLinkManager;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Action(value = SignalActionConstants.stopSimulate,isNotice = true)
public class StopSimulateAction implements ActionAble<StopSimulateRequest> {

    @Override
    public DataAble invoke(ChannelHandlerContext ctx, StopSimulateRequest request) {

        log.info("receive content:{}", JSON.toJSONString(request));
        StopSimulateRequest response = new StopSimulateRequest();
        response.setSerial(request.getSerial());
        response.setResult("0000");
        return null;
    }

    @Override
    public Class<?> getRequestClass() {
        return StopSimulateRequest.class;
    }
}